#ifndef TRIANGLE_H_
#define TRIANGLE_H_

#include "object3d.h"

class Triangle : public Object3D
{
public:
	Triangle(d_Vec3f aa, d_Vec3f bb, d_Vec3f cc, Material *m);
	Triangle(d_Vec3f aa, d_Vec3f bb, d_Vec3f cc, Material *m, d_Vec2f t0, d_Vec2f t1, d_Vec2f t2, char *texfilename);
	bool intersect(const Ray &r, Hit &h, float tmin);
	bool inside(d_Vec3f point) {return false;}
//protected:
	d_Vec3f a;
	d_Vec3f b;
	d_Vec3f c;
	d_Vec2f ta;
	d_Vec2f tb;
	d_Vec2f tc;
	d_Vec3f normal;
	Material *material;
	Image *texture;
	int width;
	int height;
	bool isTextured;

};

#endif /*TRIANGLE_H_*/
